package com.moyu.article.domain.comment;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.moyu.common.core.domain.BaseEntity;
import lombok.Data;
import org.springframework.data.annotation.Transient;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Author 赵彦博
 * @Date 2025/3/30 9:24
 */
@Data
@TableName("tb_comment")
public class Comment extends BaseEntity {

    @TableId(type = IdType.ASSIGN_ID)
    private Long commentId;
    private Long postId;
    private String postTitle;
    private Long userId;
    private String nickName;
    private Long parentId;
    private String content;
    private Integer stats;
    private Long createBy;
    private LocalDateTime createTime;
    private Long updateBy;
    private LocalDateTime updateTime;
    private Boolean isTop;

    @Transient
    private List<Comment> children;
    @Transient
    private Boolean isLiked;
    @Transient
    private Integer likeCount;
}
